﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AlbumArtOrganizer.Image
{
    public class Common
    {
        public static System.Windows.Media.Imaging.BitmapImage GetImage(Uri uri)
        {
            try
            {
                var bitmapImage = new System.Windows.Media.Imaging.BitmapImage();
                bitmapImage.BeginInit();
                bitmapImage.UriSource = uri;
                bitmapImage.EndInit();
                return bitmapImage;
            }
            catch (Exception)
            {
                return null;
            }
        }
    }
}
